<?php

namespace app\models;

use Yii;
use yii\base\Model;

/**
 * ContactForm is the model behind the contact form.
 */
class SysconfigForm extends Model
{
    public $site_name;
    public $site_addr;
    public $site_reg_id;
    public $qrcode_img;
    public $logo_img;
    public $qrcode_img_file;
    public $logo_img_file;
    public $sms_user;
    public $sms_password;
    public $useagreement;

    /**
     * @return array the validation rules.
     */
    public function rules()
    {
        return [
            [['site_name', 'site_addr','site_reg_id','sms_user','sms_password'], 'required'],
            [['site_name'], 'string', 'max' => 20],
            [['sms_user','sms_password'], 'string', 'max' => 30],
            [['site_addr'], 'string', 'max' => 128],
            [['site_reg_id'], 'string', 'max' => 50],
            [['useagreement'], 'string'],
            [['qrcode_img_file','logo_img_file'],'file'],
        ];
    }

    /**
     * @return array customized attribute labels
     */
     public function attributeLabels()
     {
         return [
           'site_name' => '网站名称',
           'site_addr' => '网址',
           'site_reg_id' => '备案号',
           'sms_user' => '短信认证服务账户名称',
           'sms_password' => '短信认证服务账户密码',
           'qrcode_img_file' => '充值使用的二维码',
           'logo_img_file' => '网站LOGO',
           'useagreement' => '网站使用协议',
         ];
     }

}
